@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateCentered {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.spin {
  animation: rotate 1s linear infinite;
}
.center {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);

  &.spin {
    animation: rotateCentered 1s linear infinite;
  }
}
